-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
35 lines (28 loc) · 916 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int DDD;
DDD = sc.nextInt();
if (DDD == 61)
System.out.println("Brasilia");
else if (DDD == 71)
System.out.println("Salvador");
else if (DDD == 11)
System.out.println("Sao Paulo");
else if (DDD == 21)
System.out.println("Rio de Janeiro");
else if (DDD == 32)
System.out.println("Juiz de Fora");
else if (DDD == 19)
System.out.println("Campinas");
else if (DDD == 27)
System.out.println("Vitoria");
else if (DDD == 31)
System.out.println("Belo Horizonte");
else
System.out.println("DDD nao cadastrado");
sc.close();
}
}